﻿using System;
using NUnit.Framework;
using WPFCalculadora;

namespace TestWPFCalculadora
{
    [TestFixture]
    public class TestEML
    {
        [Test]
        public void provaSumaDosNombresIgualLongitud()
        {
            WPFCalculadora.EML n1 = new EML("10");
            EML n2 = new EML("10");

            EML r = n1.suma(n2);

            Assert.AreEqual("20", r.ToString());
        }

        [Test]
        public void provaSumaDosNombresDiferentLongitud()
        {
            EML n1 = new EML("10");
            EML n2 = new EML("1");

            Assert.AreEqual("11", n2.suma(n1).ToString());
        }

        [Test]
        public void provaSumaQueEnPortoUnAlFinal()
        {
            EML n1 = new EML("10");
            EML n2 = new EML("99");
            Assert.AreEqual("109", n2.suma(n1).ToString());
        }

        [Test]
        public void provaResta1()
        {
            EML n1 = new EML("10");
            EML n2 = new EML("10");
            Assert.AreEqual("0", n2.resta(n1).ToString());
        }

        [Test]
        public void provaResta2()
        {
            EML n1 = new EML("10");
            EML n2 = new EML("9");
            Assert.AreEqual("1", n2.resta(n1).ToString());
        }

    }
}
